package osb.map.map;

import osb.map.publicdata.Public_Operate_And_Data;
import com.ljp.ani.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;


/**
 * 搜索activity
 */

public class Map_Search extends Activity { 
 
    @Override 
 
    protected void onCreate(Bundle savedInstanceState) 
    {        
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.map_search); 
        
        final EditText textbox=(EditText)findViewById(R.id.etSearch);
         
        Button btn_Search=(Button)findViewById(R.id.btnSearch);
        btn_Search.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)    //点击搜索
			{
				Map.Public_Static_Map.mapView.getOverlays().clear();
				String string=textbox.getText().toString();			
				if(Public_Operate_And_Data.CurrentPoint!=null)
				Map_MkSearch.GetSearch_appoint(string,Public_Operate_And_Data.CurrentPoint,50000) ; //例子
				else {
					Map_MkSearch.GetSearch_appoint(string,Public_Operate_And_Data.point_in_center_by_school,50000) ;
				}
				Map_Search.this.finish();
			}
		});
    } 
} 
